﻿#ifndef PADBUTTON_H
#define PADBUTTON_H

#include <QPushButton>
#include <QWidget>

class QSoundEffect;
class PadButton : public QPushButton
{
    Q_OBJECT
public:
    PadButton(QWidget* parent = nullptr);
    ~PadButton();

    void setPath();
    void play();
    void stop();
    void changeContinue();
    bool ifContinue(){return _isContinue;}

    // QWidget interface
protected:
    void mousePressEvent(QMouseEvent *event) override;
signals:
    void sigFinish();
private:
    bool _isContinue{false};
    QSoundEffect* _sound{Q_NULLPTR};
};

#endif // PADBUTTON_H
